"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

var _jsxRuntime = require("react/jsx-runtime");

var _Field = _interopRequireDefault(require("../Field"));

var _excluded = ["fieldProps", "proFieldProps"],
    _excluded2 = ["fieldProps", "proFieldProps"];
var valueType = 'text';
/**
 * 文本组件
 *
 * @param
 */

var ProFormText = function ProFormText(_ref) {
  var fieldProps = _ref.fieldProps,
      proFieldProps = _ref.proFieldProps,
      rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  return (0, _jsxRuntime.jsx)(_Field.default, (0, _objectSpread2.default)({
    mode: "edit",
    valueType: valueType,
    fieldProps: fieldProps,
    filedConfig: {
      valueType: valueType
    },
    proFieldProps: proFieldProps
  }, rest));
};

var Password = function Password(_ref2) {
  var fieldProps = _ref2.fieldProps,
      proFieldProps = _ref2.proFieldProps,
      rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
  return (0, _jsxRuntime.jsx)(_Field.default, (0, _objectSpread2.default)({
    mode: "edit",
    valueType: "password",
    fieldProps: fieldProps,
    proFieldProps: proFieldProps,
    filedConfig: {
      valueType: valueType
    }
  }, rest));
};

var WrappedProFormText = ProFormText;
WrappedProFormText.Password = Password; // @ts-ignore
// eslint-disable-next-line no-param-reassign

WrappedProFormText.displayName = 'ProFormComponent';
var _default = WrappedProFormText;
exports.default = _default;